﻿@model Internet.Models.ChangePasswordModel
@{
    ViewBag.Title = "Change Password";
}
<h2>
    Change Password</h2>
<p>
    Use the form below to change your password.
</p>
<p>
    New passwords are required to be a minimum of @Membership.MinRequiredPasswordLength
    characters in length.
</p>
@using (Html.BeginForm("ChangePassword", "Account", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.", new { @class = "alert alert-block alert-error" })    
    <fieldset>
        <legend>Account Information</legend>
        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            <div class="controls">
                @Html.PasswordFor(m => m.OldPassword, new { @class = "required" })
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>
        </div>
        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            <div class="controls">
                @Html.PasswordFor(m => m.NewPassword, new { @class = "required" })
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>
        </div>
        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="controls">
                @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "required" })
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
        </div>
        <div class="form-actions">
            <input type="submit" value="Change Password" class="btn btn-primary" />
        </div>
    </fieldset>
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
